<template>
  <div class="container">
    <el-card>
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item>逍遥论坛</el-breadcrumb-item>
        <el-breadcrumb-item>{{tip.tipTitle}}</el-breadcrumb-item>
      </el-breadcrumb>
    </el-card>
    <el-card>
        <span style="margin:0 10px; float:right;"><i class="el-icon-chat-dot-round"></i>{{tip.tipReplies}}条回复</span>
        <span style="margin:0 10px;float:right;"><i class="el-icon-thumb"></i>{{tip.tipClick}}次点击</span>
    </el-card>
    <el-card>
        {{tip.tipContent}}
    </el-card>
  
    <el-card  v-for="(reply,index) in replys"  :key="index">
      <a  :href="reply.user.userId">{{reply.user.userName}}</a>
      <div>{{reply.replyContent}}</div>
    </el-card>
  </div>
</template>

<script>
import Tips from '../../api/tips'
export default {
  data() {
    return {
      replys:[],
      tip: { }
    };
  },
  methods:{
    
  },  
  mounted(){
   Tips.getTipData(this.$route.query.tipId).then(res =>{
     console.log(res.data)
     this.replys = res.data.replys;
     this.tip = res.data.tip;
    }).catch(error =>{
    console.log(error)
  })
  }
   
};
</script>

<style lang="scss" scoped>
</style>